
import {
    DIC
} from '@/const/dic';
import Store from '../../store/';
const allPermission = Store.state.user.permission;
const isAdmin = Store.state.user.userInfo.superAdmin;
export const videoChannelRecordTableOption = {
    border: false,
    index: false,
    selection: false,
    calcHeight: 350,
    columnBtn: false,
    searchClearable: false,
    selectClearBtn: false,
    searchResetBtn: false,
    height: "auto",
    menu: true,
    menuAlign: "center",
    searchBtn: true,
    labelWidth: 120,
    refreshBtn: true,
    tip: false,
    addBtn: false,
    dialogWidth: '800px',
    dialogHeight: 'auto',
    menuWidth: 200,
    // editBtn: isAdmin || !!allPermission['/video_channel/edit'],
    editBtn: false,
    viewBtn: false,
    delBtn: isAdmin || !!allPermission['/admin/video-channel/record/delete'],
    column: [
        {
            "label": "主播头像",
            "prop": "anchorHeadImg",
            "search": false,
            "type": "upload",
            "fixed": true,
            "width": "auto",
            "row": false,
            "minWidth": "120",
            "readonly": false,
            "span": 12,
            "display": false,
            "hide": false,
            "listType": "picture-img",
            "showFileList": false,
            "imgHeight": 50,
            "imgWidth": "auto",
            "action": "/upload/image",
            "tip": "只能上传jpg/png文件，且不超过500kb"
        },
        {
            "label": "主播昵称",
            "prop": "anchorNickName",
            "search": false,
            "type": "text",
            "fixed": false,
            "width": "auto",
            "row": false,
            "minWidth": "120",
            "readonly": false,
            "span": 12,
            "display": false,
            "hide": false
        },
        {
            "label": "主播手机号码",
            "prop": "anchorMobile",
            "search": false,
            "type": "text",
            "fixed": false,
            "width": "auto",
            "row": false,
            "minWidth": "120",
            "readonly": false,
            "span": 12,
            "display": false,
            "hide": false
        },
        {
            "label": "直播间编号",
            "prop": "videoChannelNo",
            "search": false,
            "type": "text",
            "fixed": false,
            "width": "auto",
            "row": false,
            "minWidth": "120",
            "readonly": false,
            "span": 12,
            "display": true,
            "hide": false,
            "rules": [
                {
                    "required": true,
                    "message": "请输入频道编码 ",
                    "trigger": "blur"
                }
            ]
        },
        {
            "label": "直播间编号",
            "prop": "channelNo",
            "search": true,
            "type": "text",
            "fixed": false,
            "width": "auto",
            "row": false,
            "minWidth": "120",
            "readonly": false,
            "span": 12,
            "display": true,
            "hide": true,
            "rules": [
                {
                    "required": true,
                    "message": "请输入频道编码 ",
                    "trigger": "blur"
                }
            ]
        },
        {
            "label": "是否最新录制",
            "prop": "newestFlag",
            "search": false,
            "type": "tag",
            "fixed": false,
            "width": "auto",
            "row": false,
            "minWidth": "120",
            "readonly": false,
            "span": 12,
            "display": true,
            "hide": false,
            dicData:DIC.YesNo
        },
        {
            "label": "是否置顶",
            "prop": "topFlag",
            "search": false,
            "type": "tag",
            "fixed": false,
            "width": "auto",
            "row": false,
            "minWidth": "120",
            "readonly": false,
            "span": 12,
            "display": true,
            "hide": false,
            dicData:DIC.YesNo
        },
        {
            "label": "直播名称",
            "prop": "channelName",
            "search": false,
            "type": "text",
            "fixed": false,
            "width": "auto",
            "row": false,
            "minWidth": "120",
            "readonly": false,
            "span": 12,
            "display": true,
            "hide": false
        },
        {
            "label": "频道名称",
            "prop": "channelName",
            "search": false,
            "type": "text",
            "fixed": false,
            "width": "auto",
            "row": false,
            "minWidth": "120",
            "readonly": false,
            "span": 12,
            "display": true,
            "hide": false
        },
        {
            "label": "封面",
            "prop": "coverImg",
            "search": false,
            "type": "upload",
            "fixed": false,
            "width": "auto",
            "row": false,
            "minWidth": "120",
            "readonly": false,
            "span": 12,
            "display": true,
            "hide": false,
            "listType": "picture-img",
            "showFileList": false,
            "imgHeight": 60,
            "imgWidth": "auto",
            "action": "/upload/image",
            "tip": "只能上传jpg/png文件，且不超过500kb"
        },
        {
            "label": "实际播放数量",
            "prop": "viewNum",
            "search": false,
            "type": "number",
            "fixed": false,
            "width": "170",
            "row": false,
            "readonly": false,
            "span": 12,
            "display": true,
            "hide": false
        },
        {
            "label": "虚拟播放数量",
            "prop": "viewNumVirtual",
            "search": false,
            "type": "number",
            "fixed": false,
            "width": "170",
            "row": false,
            "readonly": false,
            "span": 12,
            "display": true,
            "hide": false
        },
        {
            "label": "录制文件大小(M)",
            "prop": "recordFileSize",
            "search": false,
            "type": "text",
            "fixed": false,
            "width": "auto",
            "row": false,
            "minWidth": "140",
            "readonly": false,
            "span": 12,
            "display": true,
            "hide": false
        },
        {
            "label": "录制文件格式",
            "prop": "recordFileFormat",
            "search": false,
            "type": "text",
            "fixed": false,
            "width": "auto",
            "row": false,
            "minWidth": "120",
            "readonly": false,
            "span": 12,
            "display": true,
            "hide": false
        },
        {
            "label": "录制开始时间",
            "prop": "recordStartTime",
            "search": false,
            "type": "datetime",
            "fixed": false,
            "width": "170",
            "row": false,
            "readonly": false,
            "span": 12,
            "display": true,
            "hide": false
        },
        {
            "label": "录制结束时间",
            "prop": "recordEndTime",
            "search": false,
            "type": "datetime",
            "fixed": false,
            "width": "170",
            "row": false,
            "readonly": false,
            "span": 12,
            "display": true,
            "hide": false
        },
        {
            "label": "录制时间(分钟)",
            "prop": "recordDurationMinutes",
            "search": false,
            "type": "text",
            "fixed": false,
            "width": "120",
            "row": false,
            "readonly": false,
            "span": 12,
            "display": true,
            "hide": false
        },
        {
            "label": "创建时间",
            "prop": "createTime",
            "search": false,
            "type": "datetime",
            "fixed": false,
            "width": "170",
            "row": false,
            "readonly": false,
            "span": 12,
            "display": false,
            "hide": false
        }
         
    ]
};
